package com.hz.filesystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;
import com.hz.filesystem.dao.HzCityDao;
import com.hz.filesystem.entity.HzCityEntity;
import com.hz.filesystem.service.HzCityService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("hzCityService")
public class HzCityServiceImpl extends ServiceImpl<HzCityDao, HzCityEntity> implements HzCityService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HzCityEntity> page = this.page(
                new Query<HzCityEntity>().getPage(params),
                new QueryWrapper<HzCityEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<HzCityEntity> getPCA() {
        List<HzCityEntity> citys = this.baseMapper.getPCA();
        return citys;
    }

}